<template>
	<el-dialog
		title="新增跟踪"
		width="600px"
		:visible.sync="visible"
		@close="close"
	>
		<el-form label-width="80px">
			<el-form-item label="跟踪内容">
                <el-input
                    type="textarea"
                    :rows="15"
                    placeholder="请输入跟踪内容"
                    v-model="content"
                >
                </el-input>
			</el-form-item>
		</el-form>

		<div class="pt-1 flex flex-justify-end">
			<el-button @click="close">关闭</el-button>
			<el-button type="primary" @click="submit">确定</el-button>
		</div>
	</el-dialog>
</template>
<script>
export default {
	name: "AddTrack",
	data() {
		return {
			visible: false,
            row:{},
            content:''
		};
	},
	methods: {
		open(row) {
            this.content=''
			this.visible = true;
            this.row=row
		},
		close() {
			this.visible = false;
			this.$emit("refresh",false);
		},
		async submit() {
            const params={
                cus_id:this.row.cus_id,
                content:this.content,
                dept_id:this.row.dept_id,
                biz_id:this.row.biz_id
            }
            try {
                await this.$service.deposit.customerTracking(params)
                this.visible = false;
            } catch (error) {
                this.$msgbox.alert('失败')
                this.visible = false;
            }
		}
	}
};
</script>
<style lang="scss" scoped></style>
